<?php
/**
 * 导航
 * User: yuanxuncheng
 * Date: 2017/1/2
 * Time: 21:45
 */

namespace app\api\controller;

use app\api\model\page\nav\GetNav as GetNavModel;
use app\api\model\page\nav\AddNav as AddNavModel;
use app\library\Error;
use think\Request;

class Nav
{

    private $getNavModel;
    private $addNavModel;

    public function __construct()
    {
        $this->param = Request::instance()->param();
    }

    /**
     * @desc 添加导航
     * @return array
     */
    public function addNav()
    {
        $this->addNavModel = new AddNavModel();
        return $this->addNavModel->excute($this->param);
    }

    /**
     * @desc 获取导航
     * @return array
     */
    public function getNav()
    {
        $this->getNavModel = new GetNavModel();
        return $this->getNavModel->excute($this->param);
    }
}
